import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    isLogin: false,
  },
  getters: {
    isLogin: (state) => {
      return state.isLogin;
    },
  },
  mutations: {
    setLogin(state, payload) {
      state.isLogin = payload;
    },
  },
  actions: {
    setLogin({ commit }, products) {
      commit("setLogin", products);
    },
  },
});
